package com.frejoys.common.vo.admin;

import com.frejoys.common.util.AppConfigUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * @author wangzhicheng
 * @version 1.0
 * @date 2024/5/15 10:46
 */
@Data
public class AdminCategoryInfoVo {
    @Schema(type = "Integer", name = "id", description = "品类id")
    private Integer id;

    // 名称
    @Schema(type = "String", name = "name", description = "名称")
    private String name;

    // 位置(英文逗号分隔)：1首页顶部，2.分类列表位置，3.列表分类广告置顶
    @Schema(type = "String", name = "site", description = "1首页顶部，2.首页商品列表")
    private String site;

    //  是否显示：0不显示，1显示
    @Schema(type = "Integer", name = "isShow", description = "0不显示，1显示")
    private Integer isShow;

    //  排序
    @Schema(type = "Integer", name = "sort", description = "排序")
    private Integer sort;

    // 状态：0无效，1有效
    @Schema(type = "Integer", name = "status", description = "状态：0无效，1有效")
    private Integer status;

    //品类封面图
    @Schema(type = "String", name = "cover", description = "品类封面图")
    private String cover;

    public String getCover() {
        return AppConfigUtil.getUrlPrefix(cover);
    }
}
